<template>
    <div class="message-desc">
      <!--面包屑-->
      <div class="bread-crumb">
        <div class="title">您当前的位置：</div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/home' }">枸杞服务平台</el-breadcrumb-item>
          <el-breadcrumb-item :to="{ path: '/home/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item :to="{ path: '/home/index.html/details.do?id='+id }">{{result.message}}</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <!--商品详情页-->
      <product-desc :data-desc="result"></product-desc>
    </div>
</template>

<script>
import {getDescMessage} from '../../../../api/message'
import ProductDesc from '../../../../components/product/ProductDesc'
export default {
  name: 'MessageDesc',
  components: {ProductDesc},
  data () {
    return {
      id: this.$route.query.id,
      result: ''
    }
  },
  created () {
    this.init()
  },
  methods: {
    init: async function () {
      const promise = await getDescMessage({id: this.id})
      console.log('消息详情：', promise)
      this.result = promise.result
    }
  }
}
</script>

<style lang="stylus" scoped>
.message-desc
  min-height 600px
  min-width 900px
  .bread-crumb
    display flex
    align-items center
    min-width 900px
</style>
